//
//  RNOLFilterProjectViewController.m
//  RongNiuOnline
//
//  Created by apple on 2018/4/19.
//  Copyright © 2018年 rongniu. All rights reserved.
//

#import "RNOLFilterProjectViewController.h"
@interface RNOLFilterProjectViewController ()

@end

@implementation RNOLFilterProjectViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = KWhiteColor;
    [self addBottomButton];
//    UIView *cycan = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.view.width , self.view.height  - 50)];
//    [self.view addSubview: cycan];
//    cycan.backgroundColor = [UIColor whiteColor];
}



#pragma mark- 添加底部按钮
- (void)addBottomButton{
    UIButton *resetButton = [UIButton buttonWithType:UIButtonTypeCustom];
    [resetButton setTitle:@"重置" forState: UIControlStateNormal];
    [resetButton setTitleColor: kTextLightGrayColor forState:UIControlStateNormal];
    resetButton.backgroundColor = KWhiteColor;
    [resetButton addTapActionWithBlock:^(UIGestureRecognizer *gestureRecoginzer) {
        !self.resetBlock? : self.resetBlock();
    }];
    ViewBorderRadius(resetButton, 0, 0.5, kTextLightGrayColor);
    [self.view addSubview: resetButton];
    
    UIButton *confirmButton = [UIButton buttonWithType:UIButtonTypeCustom];
    [confirmButton setTitle:@"确认" forState: UIControlStateNormal];
    [confirmButton setTitleColor: KWhiteColor forState:UIControlStateNormal];
    confirmButton.backgroundColor = kAppMainColor;
    [confirmButton addTapActionWithBlock:^(UIGestureRecognizer *gestureRecoginzer) {
        !self.confirmBlock? : self.confirmBlock();
    }];
    [self.view addSubview: confirmButton];

    [resetButton mas_makeConstraints:^(MASConstraintMaker *make) {
			if (@available(iOS 11.0, *)) {
				make.bottom.equalTo(self.view.mas_safeAreaLayoutGuideBottom);
			} else {
					// Fallback on earlier versions
				make.bottom.equalTo(self.view.mas_bottom);
			}
		  	make.left.equalTo(@0);
        make.height.equalTo(@50);
        make.width.equalTo(@(self.view.width/2.0));
    }];
    
    [confirmButton mas_makeConstraints:^(MASConstraintMaker *make) {
			 make.width.height.bottom.equalTo(resetButton);
			 make.right.equalTo(self.view.mas_right);
    }];
}


@end
